home *** CD-ROM | disk | FTP | other *** search
/ Gekkan Dennou Club 145 / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan).7z / Gekkan Dennou Club - 2000.6 Vol. 145 (Japan) (Track 1).bin / tools / sharp / xc2102.lzh / INCLUDE / STDLIB.H < prev    next >
Text File  |  1992-03-03  |  3KB  |  160 lines

  1. /*
  2.  * stdlib.h X68k XC Compiler v2.10 Copyright 1990,91,92 SHARP/Hudson
  3.  */
  4. #ifndef    __STDLIB_H
  5. #define    __STDLIB_H
  6.  
  7. #include    <stddef.h>
  8.  
  9. #ifdef    FORWORD
  10. #define    __PROTO_TYPE
  11. #endif
  12. #ifdef    __STDC__
  13. #define    __PROTO_TYPE
  14. #endif
  15.  
  16. #ifndef    HUGE_VAL
  17. #define    HUGE_VAL    3.5953862697247E+308
  18. #endif
  19.  
  20. #define    RAND_MAX    32767
  21. /* CLIB.L で固定の値として使用しています
  22.  * 変更したり、別な値を再定義してはいけません */
  23.  
  24. #ifndef    EXIT_SUCCESS
  25. #define    EXIT_SUCCESS    0
  26. #endif
  27. #ifndef    EXIT_FAILURE
  28. #define    EXIT_FAILURE    1
  29. #endif
  30.  
  31. extern    volatile int    errno;
  32. extern    volatile int    _doserrno;
  33. extern    unsigned char    **environ;
  34. extern    unsigned int    _PSP;
  35. extern    int        _fmode;
  36. extern    char        *sys_errlist[];
  37. extern    int        sys_nerr;
  38.  
  39. #define    max(a,b)    (((a) > (b)) ? (a) : (b))
  40. #define    min(a,b)    (((a) < (b)) ? (a) : (b))
  41.  
  42. #ifdef    __PROTO_TYPE
  43.  
  44. int    rand(void);
  45. void    srand(unsigned);
  46. int    free(void *);
  47. void    abort(void);
  48. void    exit(int);
  49. void    _exit(int);
  50. int    abs(int);
  51. short    wabs(short);
  52. long    labs(long);
  53. int    rlsml(char *, long);
  54. void    *getml(long);
  55. void    rbrk(void);
  56. void    rstmem(void);
  57. long    chkml(void);
  58. long    sizmem(void);
  59. int    bldmem(int);
  60. int    allmem(void);
  61. void    lqsort(long *, int);
  62. void    sqsort(short *, int);
  63. void    fqsort(float *, int);
  64. void    dqsort(double *, int);
  65. void    tqsort(char **, int);
  66. char    *itoa(int, char *, int);
  67. char    *ltoa(long, char *, int);
  68. char    *wtoa(short, char *, int);
  69. char    *fcvt(double, int, int *, int *);
  70. char    *gcvt(double, int, char *);
  71. char    *uitoa(unsigned int, char *, int);
  72. char    *ultoa(unsigned long, char *, int);
  73. char    *uwtoa(unsigned short, char *, int);
  74. char    *ecvt(double, int, int *, int *);
  75. int    atexit(void (*)(void));
  76. div_t    div(int, int);
  77. ldiv_t    ldiv(long, long);
  78. int    atoi(const char *);
  79. long    atol(const char *);
  80. void    *calloc(size_t, size_t);
  81. void    *malloc(size_t);
  82. void    *realloc(void *, size_t);
  83. char    *getenv(const char *);
  84. int    system(const char *);
  85. void    *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
  86. void    qsort(void *, size_t, size_t, int (*)(const void *, const void *));
  87. char    *sbrk(size_t);
  88. int    rlsmem(char *, size_t);
  89. void    *getmem(size_t);
  90. int    putenv(const char *);
  91. void    swaw(const int *, int *, int);
  92. void    swab(const char *, char *, int);
  93. short    atow(const char *);
  94. double    atof(const char *);
  95. long    strtol(const char *, char **, int);
  96. unsigned long    strtoul(const char *, char **, int);
  97. double    strtod(const char *, char **);
  98.  
  99. #undef    __PROTO_TYPE
  100. #else
  101.  
  102. int    atoi();
  103. long    atol();
  104. int    rand();
  105. void    srand();
  106. void    *calloc();
  107. int    free();
  108. void    *malloc();
  109. void    *realloc();
  110. void    abort();
  111. void    exit();
  112. void    _exit();
  113. char    *getenv();
  114. int    system();
  115. void    *bsearch();
  116. void    qsort();
  117. int    abs();
  118. short    wabs();
  119. long    labs();
  120. char    *sbrk();
  121. int    rlsmem();
  122. int    rlsml();
  123. void    *getmem();
  124. void    *getml();
  125. void    rbrk();
  126. void    rstmem();
  127. long    chkml();
  128. long    sizmem();
  129. int    bldmem();
  130. int    allmem();
  131. int    putenv();
  132. void    swaw();
  133. void    swab();
  134. void    lqsort();
  135. void    sqsort();
  136. void    fqsort();
  137. void    dqsort();
  138. void    tqsort();
  139. char    *itoa();
  140. char    *ltoa();
  141. char    *wtoa();
  142. char    *fcvt();
  143. char    *gcvt();
  144. short    atow();
  145. char    *uitoa();
  146. char    *ultoa();
  147. char    *uwtoa();
  148. char    *ecvt();
  149. double    atof();
  150. long    strtol();
  151. unsigned long    strtoul();
  152. double    strtod();
  153. int    atexit();
  154. div_t    div();
  155. ldiv_t    ldiv();
  156.  
  157. #endif
  158.  
  159. #endif
  160.